package com.cloudlinkscm.base.authcenter.assembler;

import com.cloudlinkscm.base.authcenter.model.Role;
import com.cloudlinkscm.base.authcenter.model.dto.RoleCreateDto;
import com.cloudlinkscm.loms.framework.core.pojo.SingleAssembler;
import org.springframework.stereotype.Component;

/**
 * @author : tac
 * @date : 31/07/2017
 */

@Component
public class RoleCreateDto2RoleAssembler implements SingleAssembler<RoleCreateDto, Role> {
    @Override
    public Role assemble(RoleCreateDto from) {
        Role to = new Role();
        to.setRoleName(from.getRoleName());
        to.setRemark(from.getRemark());
        return to;
    }
}
